package com.example.demo.solon.controller;

import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.hotplug.PluginManager;

/**
 * @author airhead
 */
@Controller
@Slf4j
public class PluginController {
  @Mapping("start")
  public String start() {
    PluginManager.start("demo");
    return "ok";
  }

  @Mapping("stop")
  public String stop() {
    PluginManager.stop("demo");
    return "ok";
  }
}
